﻿using System;

namespace FingerTip.Infrastructure.NotifyMessager.Event
{
    public class NotifyMessagePublisher
    {
        private static event Action<MessageEventArgs> OnNotified;

        public static void Invoke(MessageEventArgs args)
        {
            OnNotified?.Invoke(args);
        }


        public static void Register(Action<MessageEventArgs> action)
        {
            OnNotified += action;
        }

        public static void UnRegister(Action<MessageEventArgs> action)
        {
            OnNotified -= action;
        }

    }
}